<%@ page language="java" import="java.util.*,java.sql.*" pageEncoding="utf-8"%>
<%@ page import="cn.bdqn.servlet.TopicServlet" %>
<%@ page import="cn.bdqn.bean.Topic" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<title>编辑主题--管理后台</title>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.12.4.min.js"></script>
	<script type="text/javascript">
        $(function(){
            alert(111);
            $.getJSON("${pageContext.request.contextPath}/topic?opr=list",
                function (data) {
                    var list=data.list;

                    $(list).each(function(m,n){
                        var str="<li>"+n.tname+ "</li>";

                        $(".classlist").append(str);
                    })

                })

        });

	</script>
	<link href="../css/admin.css" rel="stylesheet" type="text/css" />
</head>
<body>

  <div id="main">
      <div>
	    <iframe src="<%=request.getContextPath()%>/newspages/console_element/top.jsp" scrolling="no" frameborder="0" width="947px" height="180px"></iframe>
	  </div>
      <div id="opt_list">
      	<iframe src="<%=request.getContextPath()%>/newspages/console_element/left.jsp" scrolling="no" frameborder="0" width="130px"></iframe>
      </div>
	  <div id="opt_area">
	    <ul class="classlist">

			<%--<c:forEach items="${list}" var="t">
				<li> ${t.tname}
					<img src="${pageContext.request.contextPath}/upload/${t.tpic}" width="30" height="20"/>
					&nbsp;&nbsp;&nbsp;&nbsp; <a href="<%=request.getContextPath()%>/topic?opr=upd&tid=${t.tid}">修改</a>
					&nbsp;&nbsp;&nbsp;&nbsp; <a href="<%=request.getContextPath()%>/topic?opr=del&tid=${t.tid}">删除</a>
				</li>
			</c:forEach>
			<li>
				第${page.pageNo}页/共${page.totalPage}页
				<c:if test="${page.pageNo>1}">
					<a href="${pageContext.request.contextPath}/topic?opr=list&pageNo=1">首页</a>
					<a href="${pageContext.request.contextPath}/topic?opr=list&pageNo=${page.pageNo-1}">上一页</a>
				</c:if>
				<c:if test="${page.pageNo<page.totalPage}">
					<a href="${pageContext.request.contextPath}/topic?opr=list&pageNo=${page.pageNo+1}">下一页</a>
					<a href="${pageContext.request.contextPath}/topic?opr=list&pageNo=${page.totalPage}">末页</a>
				</c:if>

			</li>--%>

			<%--<%

				}
			%>--%>
			</ul>
	  </div>
	  <iframe src="<%=request.getContextPath()%>/newspages/console_element/bottom.jsp" scrolling="no" frameborder="0" width="947px" height="190px"></iframe>
  </div>

</body>

</html>